import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { UmService } from './um.service';
import { CreateUmDto } from './dto/create-um.dto';
import { UpdateUmDto } from './dto/update-um.dto';

@Controller('um')
export class UmController {
  constructor(private readonly umService: UmService) {}

  @Post()
  create(@Body() createUmDto: CreateUmDto) {
    return this.umService.create(createUmDto);
  }

  @Get()
  findAll() {
    return this.umService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.umService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateUmDto: UpdateUmDto) {
    return this.umService.update(+id, updateUmDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.umService.remove(+id);
  }
}
